package org.xcorpio.java8.chapter06;

import java.util.stream.Collectors;

import org.xcorpio.java8.common.Data;
import org.xcorpio.java8.common.Dish;

public class JoiningStrings {

    public static void main(String[] args) {
        String shortMenu = Data.Menu.stream().map(Dish::getName).collect(Collectors.joining(","));
        System.out.println(shortMenu);
    }
}
